using System;
using System.ComponentModel.DataAnnotations;
using HengTong.Model.Interfaces;
using WalkingTec.Mvvm.Core;
using WalkingTec.Mvvm.Core.Attributes;

namespace HengTong.Model.Db.SupplyChain.Purchase;

/// <summary>
/// 采购申请单明细附件关联表
/// </summary>
/// <remarks>
/// 用于建立采购申请单明细与附件文件的多对多关联关系，支持上传技术文件、图纸等
/// </remarks>
[MiddleTable]
public class SysPurchaseRequestBillEntryFile: BasePoco, IFileBase
{
    /// <summary>
    /// 获取或设置明细行ID
    /// </summary>
    /// <value>关联的采购申请单明细行ID</value>
    [Display(Name = "明细行ID", Description = "关联的采购申请单明细行ID", GroupName = "关联信息")]
    public Guid? EntryId { get; set; }
    
    /// <summary>
    /// 获取或设置明细行
    /// </summary>
    /// <value>关联的采购申请单明细行实体</value>
    [Display(Name = "明细行", Description = "关联的采购申请单明细行", GroupName = "关联信息")]
    public SysPurchaseRequestBillEntry Entry { get; set; }

    /// <summary>
    /// 获取或设置文件ID
    /// </summary>
    /// <value>文件的唯一标识</value>
    [Display(Name = "文件ID", Description = "文件唯一标识", GroupName = "文件信息")]
    public Guid? FileId { get; set; }

    /// <summary>
    /// 获取或设置文件
    /// </summary>
    /// <value>附件文件对象</value>
    [Display(Name = "文件", Description = "文件对象", GroupName = "文件信息")]
    public FileAttachment File { get; set; }

    /// <summary>
    /// 获取或设置排序
    /// </summary>
    /// <value>文件的显示顺序</value>
    [Display(Name = "排序", Description = "文件顺序", GroupName = "文件信息")]
    public int Order { get; set; }
}